<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::group([
    'namespace' => 'Auth',
    'prefix' => 'auth',
], function () {
    //项目登录
    Route::post('/project/login', 'LoginController@loginProject');
    //公司登录
    Route::post('/company/login', 'LoginController@loginCompany');
    //登出
    Route::post('/logout', 'LoginController@logout');

});

Route::group([
    'middleware' => 'apiAuth',
], function () {
    Route::group([
        'namespace' => 'Admin',
        'prefix' => 'auth',
    ], function () {
        Route::post('/auth/changePwd', 'AdminController@changePwd');
        //-------------------管理员管理-------------------//
        Route::post('/admin/lists', 'AdminController@lists');
        Route::post('/admin/selectLists', 'AdminController@selectLists');
        Route::post('/admin/add', 'AdminController@add');
        Route::post('/admin/info', 'AdminController@info');
        Route::post('/admin/edit', 'AdminController@edit');
        Route::post('/admin/editStatus', 'AdminController@editStatus');
        Route::post('/admin/setRole', 'AdminController@setRole');
        Route::post('/admin/setPermission', 'AdminController@setPermission');
        //-------------------角色管理-------------------//
        Route::post('/role/lists', 'RoleController@lists');
        Route::post('/role/selectLists', 'RoleController@selectLists');
        Route::post('/role/add', 'RoleController@add');
        Route::post('/role/info', 'RoleController@info');
        Route::post('/role/edit', 'RoleController@edit');
        Route::post('/role/editStatus', 'RoleController@editStatus');
        Route::post('/role/delete', 'RoleController@delete');
        Route::post('/role/setPermission', 'RoleController@setPermission');
        Route::post('/role/getPermission', 'RoleController@getPermission');
        //-------------------权限管理-------------------//
        Route::post('/permission/lists', 'PermissionController@lists');
    });

    Route::group([
        'namespace' => 'HumanResourceManage',
        'prefix' => 'hrm',
    ], function () {
        //-------------------普通工人管理-------------------//
        Route::post('/employee/lists', 'EmployeeController@lists');
        Route::post('/employee/add', 'EmployeeController@add');
        Route::post('/employee/info', 'EmployeeController@info');
        Route::post('/employee/edit', 'EmployeeController@edit');
        Route::post('/employee/delete', 'EmployeeController@delete');
        Route::post('/employee/search', 'EmployeeController@search');
        Route::post('/employee/batchChangeStatus', 'EmployeeController@batchChangeStatus');
        Route::post('/employee/batchChangeProject', 'EmployeeController@batchChangeProject');
        Route::post('/employee/attendance', 'EmployeeController@attendance');
        Route::post('/employee/attendanceList', 'EmployeeController@attendanceList');
        Route::post('/employee/supplement', 'EmployeeController@supplement');
        Route::post('/employee/addAttendance', 'EmployeeController@addAttendance');
        Route::post('/employee/deleteAttendance', 'EmployeeController@deleteAttendance');
        Route::post('/employee/dayValueLists', 'EmployeeController@dayValueLists');
        Route::post('/employee/batchEditDayValue', 'EmployeeController@batchEditDayValue');


        //-------------------班组管理-------------------//
        Route::post('/group/lists', 'GroupController@lists');
        Route::post('/group/add', 'GroupController@add');
        Route::post('/group/info', 'GroupController@info');
        Route::post('/group/edit', 'GroupController@edit');
        Route::post('/group/editStatus', 'GroupController@editStatus');
        Route::post('/group/delete', 'GroupController@delete');
        Route::post('/group/memberLists', 'GroupController@memberLists');
        Route::post('/group/addMember', 'GroupController@addMember');
        Route::post('/group/delMember', 'GroupController@delMember');
        Route::post('/group/changeProject', 'GroupController@changeProject');
        Route::post('/group/notInGroup', 'GroupController@notInGroup');
        Route::post('/group/selectLists', 'GroupController@selectLists');

        //-------------------供应商管理-------------------//
        Route::post('/supplier/lists', 'SupplierController@lists');
        Route::post('/supplier/add', 'SupplierController@add');
        Route::post('/supplier/info', 'SupplierController@info');
        Route::post('/supplier/edit', 'SupplierController@edit');
        Route::post('/supplier/delete', 'SupplierController@delete');
        Route::post('/supplier/editStatus', 'SupplierController@editStatus');
        Route::post('/supplier/selectLists', 'SupplierController@selectLists');
        //-------------------专业班组管理-------------------//
        Route::post('/technical/companyLists', 'TechnicalController@companyLists');
        Route::post('/technical/addCompany', 'TechnicalController@addCompany');
        Route::post('/technical/editCompany', 'TechnicalController@editCompany');
        Route::post('/technical/deleteCompany', 'TechnicalController@deleteCompany');
        Route::post('/technical/companyInfo', 'TechnicalController@companyInfo');
        Route::post('/technical/groupLists', 'TechnicalController@groupLists');
        Route::post('/technical/addGroup', 'TechnicalController@addGroup');
        Route::post('/technical/editGroup', 'TechnicalController@editGroup');
        Route::post('/technical/groupInfo', 'TechnicalController@groupInfo');
        Route::post('/technical/deleteGroup', 'TechnicalController@deleteGroup');
        Route::post('/technical/adjustProject', 'TechnicalController@adjustProject');
    });

    Route::group([
        'namespace' => 'Project',
        'prefix' => 'project',
    ], function () {
        //-------------------施工管理-------------------//
        Route::post('/project/selectLists', 'ProjectController@selectLists');
        Route::post('/project/lists', 'ProjectController@lists');
        Route::post('/project/add', 'ProjectController@add');
        Route::post('/project/info', 'ProjectController@info');
        Route::post('/project/edit', 'ProjectController@edit');
        Route::post('/project/editStatus', 'ProjectController@editStatus');
        Route::post('/project/delete', 'ProjectController@delete');

        Route::post('/project/areaLists', 'ProjectController@areaLists');
        Route::post('/project/addArea', 'ProjectController@addArea');
        Route::post('/project/batchAddArea', 'ProjectController@batchAddArea');
        Route::post('/project/areaInfo', 'ProjectController@areaInfo');
        Route::post('/project/editArea', 'ProjectController@editArea');
        Route::post('/project/delArea', 'ProjectController@delArea');
        Route::post('/project/areaSelectLists', 'ProjectController@areaSelectLists');

        Route::post('/project/sectionLists', 'ProjectController@sectionLists');
        Route::post('/project/addSection', 'ProjectController@addSection');
        Route::post('/project/batchAddSection', 'ProjectController@batchAddSection');
        Route::post('/project/sectionInfo', 'ProjectController@sectionInfo');
        Route::post('/project/editSection', 'ProjectController@editSection');
        Route::post('/project/delSection', 'ProjectController@delSection');
        Route::post('/project/sectionSelectLists', 'ProjectController@sectionSelectLists');
        Route::post('/project/setFormworkArea', 'ProjectController@setFormworkArea');
        Route::post('/project/setBudgetFormworkArea', 'ProjectController@setBudgetFormworkArea');

        Route::post('/project/costArea', 'ProjectController@costArea');
        Route::post('/project/costSection', 'ProjectController@costSection');

        Route::post('/project/budgetArea', 'ProjectController@budgetArea');
        Route::post('/project/budgetSection', 'ProjectController@budgetSection');
        Route::post('/project/budgetDetail', 'ProjectController@budgetDetail');
        Route::post('/project/editBudget', 'ProjectController@editBudget');

        Route::post('/project/group', 'ProjectController1@group');
        Route::post('/project/group1', 'ProjectController1@group1');
        Route::post('/project/getBatch', 'ProjectController1@getBatch');
        Route::post('/project/separateLog', 'ProjectController1@separateLog');
        Route::post('/project/groupAssignment', 'ProjectController1@groupAssignment');
        Route::post('/project/groupAccounts', 'ProjectController1@groupAccounts');
        Route::post('/project/workmanAccountsList', 'ProjectController1@workmanAccountsList');

        Route::post('/project/delAssignment', 'ProjectController@delAssignment');
        Route::post('/project/addAssignment', 'ProjectController@addAssignment');
        Route::post('/project/addAccount', 'ProjectController@addAccount');

        Route::post('/project/delAccount', 'ProjectController1@delAccount');

        Route::post('/project/handymanAccountsLists', 'ProjectController@handymanAccountsLists');
        Route::post('/project/handymanAccountsLists2', 'ProjectController@handymanAccountsLists2');
        Route::post('/project/addHandymanAccounts', 'ProjectController@addHandymanAccounts');
        Route::post('/project/delHandymanAccount', 'ProjectController@delHandymanAccount');
    });

    Route::group([
        'namespace' => 'Warehouse',
        'prefix' => 'warehouse',
    ], function () {
        //-------------------仓库管理-------------------//
        Route::post('/warehouse/lists', 'WarehouseController@lists');
        Route::post('/warehouse/materialLists', 'WarehouseController@materialLists');
        Route::post('/warehouse/specLists', 'WarehouseController@specLists');
        Route::post('/warehouse/inLog', 'WarehouseController@inLog');
        Route::post('/warehouse/outLog', 'WarehouseController@outLog');
        Route::post('/warehouse/materialLog', 'WarehouseController@materialLog');
        Route::post('/warehouse/setSalePrice', 'WarehouseController@setSalePrice');
        Route::post('/warehouse/purchase', 'WarehouseController@purchase');
        Route::post('/warehouse/returnedPurchase', 'WarehouseController@returnedPurchase');
        Route::post('/warehouse/expend', 'WarehouseController@expend');
        Route::post('/warehouse/consume', 'WarehouseController@consume');
        Route::post('/warehouse/groupConsume', 'WarehouseController@groupConsume');
        Route::post('/warehouse/allot', 'WarehouseController@allot');
        Route::post('/warehouse/breakdown', 'WarehouseController@breakdown');
        Route::post('/warehouse/adjust', 'WarehouseController@adjust');
        Route::post('/warehouse/adjustLists', 'WarehouseController@adjustLists');
        Route::post('/warehouse/adjustInfo', 'WarehouseController@adjustInfo');
        Route::post('/warehouse/deleteAdjust', 'WarehouseController@deleteAdjust');
        Route::post('/warehouse/adjustStart', 'WarehouseController@adjustStart');
        Route::post('/warehouse/adjustReceive', 'WarehouseController@adjustReceive');
        Route::post('/warehouse/adjustComplete', 'WarehouseController@adjustComplete');
    });

    Route::group([
        'namespace' => 'Finance',
        'prefix' => 'finance',
    ], function () {
        //-------------------财务管理-------------------//
        Route::post('/wage/personalWage', 'WageController@personalWage');
        Route::post('/wage/personalWageWorkmanAccounts', 'WageController@personalWageWorkmanAccounts');
        Route::post('/wage/personalWageHandymanAccounts', 'WageController@personalWageHandymanAccounts');
        Route::post('/wage/personalWageAttendance', 'WageController@personalWageAttendance');
        Route::post('/wage/personalWageMaterialAccounts', 'WageController@personalWageMaterialAccounts');
        Route::post('/wage/personalWageLoan', 'WageController@personalWageLoan');
        Route::post('/wage/personalWageLivingRecharge', 'WageController@personalWageLivingRecharge');
        Route::post('/wage/personalWageLivingRefund', 'WageController@personalWageLivingRefund');
        Route::post('/wage/employeeWages', 'WageController@employeeWages');
        Route::post('/wage/employeeWageCollect', 'WageController@employeeWageCollect');
        Route::post('/wage/managerWages', 'WageController@managerWages');
        Route::post('/wage/managerWageCollect', 'WageController@managerWageCollect');
        Route::post('/wage/settlement', 'FinanceController@settlement');

        Route::post('/supplier/supplierFinance', 'SupplierOrdersController@supplierFinance');
        Route::post('/supplier/supplierProjectFinance', 'SupplierOrdersController@supplierProjectFinance');
        Route::post('/supplier/supplierProjectOrdersFinance', 'SupplierOrdersController@supplierProjectOrdersFinance');
        Route::post('/supplier/ordersLists', 'SupplierOrdersController@orderListsPerMonth');
        Route::post('/supplier/repaymentLists', 'SupplierOrdersController@repaymentLists');
        Route::post('/supplier/repayment', 'SupplierOrdersController@repayment');

        Route::post('/supplier/orderLists', 'SupplierOrdersController@orderLists');
        Route::post('/supplier/deleteOrder', 'SupplierOrdersController@deleteOrder');
        Route::post('/supplier/orderInfo', 'SupplierOrdersController@orderInfo');
        Route::post('/supplier/orderInfo2', 'SupplierOrdersController@orderInfo2');
        Route::post('/supplier/deleteOrderInfo', 'SupplierOrdersController@deleteOrderInfo');
        Route::post('/supplier/receive', 'SupplierOrdersController@receive');
        Route::post('/supplier/received', 'SupplierOrdersController@received');
        Route::post('/supplier/changeAmount', 'SupplierOrdersController@changeAmount');
        Route::post('/supplier/complete', 'SupplierOrdersController@complete');
        Route::post('/supplier/orderReceived', 'SupplierOrdersController@orderReceived');


        Route::post('/technical/technicalFinance', 'FinanceController@technicalFinance');
        Route::post('/technical/technicalGroupFinance', 'FinanceController@technicalGroupFinance');
        Route::post('/technical/technicalProjectFinance', 'FinanceController@technicalProjectFinance');
        Route::post('/technical/saveTechnicalCompanyAccount', 'FinanceController@saveTechnicalCompanyAccount');

        Route::post('/loan/projectLists', 'LoanController@projectLists');
        Route::post('/loan/bookLists', 'LoanController@bookLists');
        Route::post('/loan/addBook', 'LoanController@addBook');
        Route::post('/loan/bookInfo', 'LoanController@bookInfo');
        Route::post('/loan/deleteBook', 'LoanController@deleteBook');
        Route::post('/loan/accountLists', 'LoanController@accountLists');
        Route::post('/loan/addAccount', 'LoanController@addAccount');
        Route::post('/loan/deleteAccount', 'LoanController@deleteAccount');
        Route::post('/loan/mothball', 'LoanController@mothball');
        Route::post('/loan/loanLog', 'LoanController@loanLog');
        Route::post('/loan/loanCollect', 'LoanController@loanCollect');

        Route::post('/living/projectLists', 'LivingController@projectLists');
        Route::post('/living/rechargeBookLists', 'LivingController@rechargeBookLists');
        Route::post('/living/addRechargeBook', 'LivingController@addRechargeBook');
        Route::post('/living/refundBookLists', 'LivingController@refundBookLists');
        Route::post('/living/addRefundBook', 'LivingController@addRefundBook');
        Route::post('/living/bookInfo', 'LivingController@bookInfo');
        Route::post('/living/deleteBook', 'LivingController@deleteBook');
        Route::post('/living/mothball', 'LivingController@mothball');
        Route::post('/living/accountLists', 'LivingController@accountLists');
        Route::post('/living/addAccount', 'LivingController@addAccount');
        Route::post('/living/deleteAccount', 'LivingController@deleteAccount');
        Route::post('/living/livingLog', 'LivingController@livingLog');
        Route::post('/living/livingCollect', 'LivingController@livingCollect');
    });


    //系统设置
    Route::group([
        'namespace' => 'Setting',
        'prefix' => 'setting',
    ], function () {
        Route::post('/notice/showLists', 'NoticeController@showLists');
        Route::post('/notice/lists', 'NoticeController@lists');
        Route::post('/notice/info', 'NoticeController@info');
        Route::post('/notice/add', 'NoticeController@add');
        Route::post('/notice/edit', 'NoticeController@edit');
        Route::post('/notice/delete', 'NoticeController@delete');
        Route::post('/notice/updateTop', 'NoticeController@updateTop');
        Route::post('/notice/updateShow', 'NoticeController@updateShow');

        Route::post('/unit/lists', 'UnitController@lists');
        Route::post('/unit/info', 'UnitController@info');
        Route::post('/unit/add', 'UnitController@add');
        Route::post('/unit/edit', 'UnitController@edit');
        Route::post('/unit/editStatus', 'UnitController@editStatus');

        Route::post('/year/lists', 'YearController@lists');
        Route::post('/year/info', 'YearController@info');
        Route::post('/year/add', 'YearController@add');
        Route::post('/year/edit', 'YearController@edit');
        Route::post('/year/delete', 'YearController@delete');

        Route::post('/profession/lists', 'ProfessionController@lists');
        Route::post('/profession/selectLists', 'ProfessionController@selectLists');
        Route::post('/profession/info', 'ProfessionController@info');
        Route::post('/profession/add', 'ProfessionController@add');
        Route::post('/profession/edit', 'ProfessionController@edit');
        Route::post('/profession/editStatus', 'ProfessionController@editStatus');
        Route::post('/profession/copyAssignment', 'ProfessionController@copyAssignment');

        Route::post('/assignment/lists', 'AssignmentController@lists');
        Route::post('/assignment/info', 'AssignmentController@info');
        Route::post('/assignment/add', 'AssignmentController@add');
        Route::post('/assignment/edit', 'AssignmentController@edit');
        Route::post('/assignment/editStatus', 'AssignmentController@editStatus');
        Route::post('/assignment/label', 'AssignmentController@label');
        Route::post('/assignment/labelLists', 'AssignmentController@labelLists');

        Route::post('/material/categoryLists', 'MaterialController@categoryLists');
        Route::post('/material/lists', 'MaterialController@lists');
        Route::post('/material/selectLists', 'MaterialController@selectLists');
        Route::post('/material/addMaterial', 'MaterialController@addMaterial');
        Route::post('/material/editMaterial', 'MaterialController@editMaterial');
        Route::post('/material/editStatus', 'MaterialController@editStatus');
        Route::post('/material/deleteMaterial', 'MaterialController@deleteMaterial');
        Route::post('/material/specLists', 'MaterialController@specLists');
        Route::post('/material/specSelectLists', 'MaterialController@specSelectLists');
        Route::post('/material/addSpec', 'MaterialController@addSpec');
        Route::post('/material/editSpec', 'MaterialController@editSpec');
        Route::post('/material/editSpecStatus', 'MaterialController@editSpecStatus');
        Route::post('/material/deleteSpec', 'MaterialController@deleteSpec');

        Route::post('/setting/getRate', 'SettingController@getRate');
        Route::post('/setting/setRate', 'SettingController@setRate');

    });

    Route::group([
        'namespace' => 'Setting',
        'prefix' => 'approval',
    ], function () {
        Route::post('/approval/nodeLists', 'ApprovalController@nodeLists');
        Route::post('/approval/addNode', 'ApprovalController@addNode');
        Route::post('/approval/addNodeRole', 'ApprovalController@addNodeRole');
        Route::post('/approval/deleteNode', 'ApprovalController@deleteNode');
        Route::post('/approval/deleteRole', 'ApprovalController@deleteRole');

        Route::post('/approval/approvalData', 'ApprovalController@approvalData');
        Route::post('/approval/processLists', 'ApprovalController@processLists');
        Route::post('/approval/projectProcessLists', 'ApprovalController@projectProcessLists');
        Route::post('/approval/processInfo', 'ApprovalController@processInfo');
        Route::post('/approval/approvalDataAssignment', 'ApprovalController@approvalDataAssignment');
        Route::post('/approval/approvalDataAssignmentInfo', 'ApprovalController@approvalDataAssignmentInfo');
        Route::post('/approval/approvalDataHandymanAccounts', 'ApprovalController@approvalDataHandymanAccounts');
        Route::post('/approval/approvalDataHandymanAccountsInfo', 'ApprovalController@approvalDataHandymanAccountsInfo');
        Route::post('/approval/approvalDataAttendance', 'ApprovalController@approvalDataAttendance');
        Route::post('/approval/approvalDataLoan', 'ApprovalController@approvalDataLoan');
        Route::post('/approval/approvalDataLiving', 'ApprovalController@approvalDataLiving');
        Route::post('/approval/approvalDataConsume', 'ApprovalController@approvalDataConsume');
        Route::post('/approval/approvalDataGroupConsume', 'ApprovalController@approvalDataGroupConsume');
        Route::post('/approval/approvalDataSupplier', 'ApprovalController@approvalDataSupplier');
        Route::post('/approval/initiateApplication', 'ApprovalController@initiateApplication');
        Route::post('/approval/accountSubmit', 'ApprovalController@accountSubmit');
        Route::post('/approval/submit', 'ApprovalController@submit');

        Route::post('/groupConsume/reject', 'ApprovalResultController@groupConsumeReject');
        Route::post('/groupConsume/consent', 'ApprovalResultController@groupConsumeConsent');
        Route::post('/consume/reject', 'ApprovalResultController@consumeReject');
        Route::post('/consume/consent', 'ApprovalResultController@consumeConsent');
        Route::post('/supplier/reject', 'ApprovalResultController@supplierReject');
        Route::post('/supplier/consent', 'ApprovalResultController@supplierConsent');
        Route::post('/living/reject', 'ApprovalResultController@livingReject');
        Route::post('/living/consent', 'ApprovalResultController@livingConsent');
        Route::post('/loan/reject', 'ApprovalResultController@loanReject');
        Route::post('/loan/consent', 'ApprovalResultController@loanConsent');
        Route::post('/attendance/reject', 'ApprovalResultController@attendanceReject');
        Route::post('/attendance/consent', 'ApprovalResultController@attendanceConsent');
        Route::post('/handymanAccounts/reject', 'ApprovalResultController@handymanAccountsReject');
        Route::post('/handymanAccounts/consent', 'ApprovalResultController@handymanAccountsConsent');
        Route::post('/workmanAssignment/reject', 'ApprovalResultController@workmanAssignmentReject');
        Route::post('/workmanAccount/reject', 'ApprovalResultController@workmanAccountReject');
        Route::post('/workmanAssignment/consent', 'ApprovalResultController@workmanAssignmentConsent');
    });

    Route::group([
        'namespace' => 'Excel',
        'prefix' => 'excel',
    ], function () {
        //-------------------导出管理-------------------//
        Route::post('/export/employeeLists', 'ExportController@employeeLists');
        Route::post('/export/personalWage', 'ExportController@personalWage');
        Route::post('/export/attendance', 'ExportController@attendance');
        Route::post('/export/attendanceAll', 'ExportController@attendanceAll');
        Route::post('/export/workmanAssignment', 'ExportController@workmanAssignment');
        Route::post('/export/workmanAccounts', 'ExportController@workmanAccounts');
        Route::post('/export/handymanAccounts', 'ExportController@handymanAccounts');

        Route::post('/export/employeeWageLists', 'ExportController@employeeWageLists');
        Route::post('/export/managerWageLists', 'ExportController@managerWageLists');

        Route::post('/export/materialsLists', 'ExportController@materialsLists');

        Route::get('/download', 'ExportController@download');

        Route::post('/import/employeeLists', 'ImportController@employeeLists');
        Route::post('/import/materialLists', 'ImportController@materialLists');
        Route::post('/import/warehouseMaterial', 'ImportController@warehouseMaterial');
    });
});
